<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
   <style>
       body{
           padding-top: 200px;
           text-align: center;
       }
       .box{
           width: 100px;
           height: 100px;
           background-color: red;
           margin: 0px  auto;
       }

   </style>
</head>
<body>
    <div class="box">

    </div><br>
    <button id="btn1">显示</button>
    <button id="btn2">隐藏</button>
    <button id="btn3">切换</button>
</body>
<script src="../lib/jquery.min.js"></script>
<script>
    $(function(){
        
        $("#btn2").click(function(){
            //原生js
            //hide romove都可以隐藏元素  hide只是隐藏 remove是删除
            $(".box").hide()
        })
        $("#btn1").click(function(){
            //原生js
           //show为显示
            $(".box").show()
        })
        $("#btn3").click(function(){
            //原生js
           //toggle为显示
            $(".box").toggle()
        })
    });
</script>
</html>